import React from "react";
import { Header } from "./Header";
import { BrowserRouter, Route, Link, Switch } from 'react-router-dom';
import { Provider } from 'react-redux';
import store from "./store";
import Home from "./Home";
import Login from "./Login";


//! router hooks里的方法
const App = () => {
    return (
        <Provider store={store}>
            <BrowserRouter>
                <Header />
                <Switch>
                    <Route path='/' exact><Home/></Route>
                    <Route path='/login'><Login/></Route>
                </Switch>
            </BrowserRouter>
        </Provider>
    )
}

export default App;
